package com.bskj.kuaifu.controller.web.api;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.bskj.kuaifu.service.IUserInfoService;

@Controller
@RequestMapping("api/userCarApi")
public class UserCarApi {
	
	@Autowired
	private IUserInfoService userInfoService;
	
	@ResponseBody
	@RequestMapping("/addCar")
	public Map<String, Object> addCar(String openid ,String plateNumber) throws Exception{
		Map<String, Object> resultMap =new HashMap<>();
		resultMap=userInfoService.bindCarNo(openid, plateNumber);
		return resultMap;
	}
	
	@ResponseBody
	@RequestMapping("/delCar")
	public Map<String, Object> delCar(String openid ,String plateNumber) throws Exception{
		Map<String, Object> resultMap =new HashMap<>();
		resultMap=userInfoService.delCarNo(openid,plateNumber);
		return resultMap;
	}
}
